<template>
    <router-link :to="{path: '/product', query: { id: this.id }}">
        <div id="productBrief">
        <img :src="image" alt="">
        <span id="name">{{name}}</span>
        <div id="moreinfo">
            <span>￥{{price}}</span>
            <span id="sellername">{{sellername}}</span>
        </div>
    </div>
    </router-link>
</template>

<style scoped>

img {
    height: 200px;
    width: 200px;
}

#productBrief {
    width: 200px;
    height: 320px;
    font-size: 14px;
    background-color: #fff;
    margin-bottom: 20px;
    margin-left: 10px;
    margin-right: 10px;
}

#productBrief, #moreinfo {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

#name, #moreinfo {
    padding: 10px;
}

#name {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    padding-bottom: 0px;
}

#sellername {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    overflow: hidden;
}

</style>

<script>
export default {
    props: {
        image: '',
        name: '',
        price: '',
        sellername: '',
        id: ''
    }
}
</script>